package com.heima.controller;

import com.heima.pojo.entity.TaskDetails;
import com.heima.service.TaskDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * \* User: chy
 * \* Date: 2025/8/23  15:24
 * \* Description:
 * \
 */
@RestController
@RequestMapping("/api/task-service/taskDetails")
public class TaskDetailsController {
    @Autowired
    private TaskDetailsService taskDetailsService;

    /**
     * 获取任务详情
     * @param taskId
     * @return
     */
    @RequestMapping("/{taskId}")
    public List<TaskDetails> list(@PathVariable Integer taskId) {

        List<TaskDetails> list = taskDetailsService.listDetails(taskId);
        return list;
    }
}
